<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<table class="tableUpload">
    <colgroup>
        <col width="18%">
        <col width="10%">
        <col width="10%">
        <col width="62%">
    </colgroup>
    <tr>
        <th colspan="4">随附单证</th>
    </tr>
    <tr>
        <td>工商营业执照</td>
        <td>
            <input type="hidden" name="attachInspList[0].fileId" id="fileId_0"
                   value="${attachMap['1'].fileId}">
            <input type="text" name="attachInspList[0].annexname" id="annexname_0" readonly="readonly"
                   value="${attachMap['1'].annexname}">
            <input type="hidden" name="attachInspList[0].annextype" value="1">
        </td>

        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tbody id="filetable_0">
                <tr>
                </tr>
                </tbody>
            </table>
        </td>
        <td>
            <a class='btn-link' onclick="_download(0)" href="javascript:void(0)">
                <span style='color:#00acec' id="annexname_a_0">${attachMap['1'].annexname}</span>
            </a>
        </td>
    </tr>
    <tr>
        <td>企业质量承诺书声明</td>
        <td>
            <input type="hidden" name="attachInspList[1].fileId" id="fileId_1"
                   value="${attachMap['2'].fileId}">
            <input type="text" name="attachInspList[1].annexname" id="annexname_1" readonly="readonly"
                   value="${attachMap['2'].annexname}">
            <input type="hidden" name="attachInspList[1].annextype" value="2">
        </td>

        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tbody id="filetable_1">
                <tr>
                </tr>
                </tbody>
            </table>
        </td>
        <td>
            <a class='btn-link' onclick="_download(1)" href="javascript:void(0)">
                <span style='color:#00acec' id="annexname_a_1">${attachMap['2'].annexname}</span>
            </a>
        </td>
    </tr>
    <tr>
        <td>企业质量管理制度</td>
        <td>
            <input type="hidden" name="attachInspList[2].fileId" id="fileId_2"
                   value="${attachMap['3'].fileId}">
            <input type="text" name="attachInspList[2].annexname" id="annexname_2" readonly="readonly"
                   value="${attachMap['3'].annexname}">
            <input type="hidden" name="attachInspList[2].annextype" value="3">
        </td>

        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tbody id="filetable_2">
                <tr>
                </tr>
                </tbody>
            </table>
        </td>
        <td>
            <a class='btn-link' onclick="_download(2)" href="javascript:void(0)">
                <span style='color:#00acec' id="annexname_a_2">${attachMap['3'].annexname}</span>
            </a>
        </td>
    </tr>
    <tr>
        <td>电商平台管控措施</td>
        <td>
            <input type="hidden" name="attachInspList[3].fileId" id="fileId_3"
                   value="${attachMap['99'].fileId}">
            <input type="text" name="attachInspList[3].annexname" id="annexname_3" readonly="readonly"
                   value="${attachMap['99'].annexname}">
            <input type="hidden" name="attachInspList[3].annextype" value="99">
        </td>

        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tbody id="filetable_3">
                <tr>
                </tr>
                </tbody>
            </table>
        </td>
        <td>
            <a class='btn-link' onclick="_download(3)" href="javascript:void(0)">
                <span style='color:#00acec' id="annexname_a_3">${attachMap['99'].annexname}</span>
            </a>
        </td>
    </tr>


</table>


<script type="text/javascript">
    function _download(index)
    {
        var fileId = $("#fileId_" + index).val();
        if(null == fileId || "" == fileId)
        {
            return;
        }
        fileDownload(fileId)
    }
<c:if test="${isEditablePage}">
    $(function () {
        zzupload("filetable_0", function(data){
            $("#fileId_0").val(data.fileId);
            $("#annexname_0").val(data.fileName);
            $("#annexname_a_0").html(data.fileName);
            $("#annexname_0").valid();
            layerAlertOk("上传成功");
        }, true);
        zzupload("filetable_1", function(data){
            $("#fileId_1").val(data.fileId);
            $("#annexname_1").val(data.fileName);
            $("#annexname_a_1").html(data.fileName);
            $("#annexname_1").valid();
            layerAlertOk("上传成功");
        }, true);
        zzupload("filetable_2", function(data){
            $("#fileId_2").val(data.fileId);
            $("#annexname_2").val(data.fileName);
            $("#annexname_a_2").html(data.fileName);
            $("#annexname_2").valid();
            layerAlertOk("上传成功");
        }, true);
        zzupload("filetable_3", function(data){
            $("#fileId_3").val(data.fileId);
            $("#annexname_3").val(data.fileName);
            $("#annexname_a_3").html(data.fileName);
            $("#annexname_3").valid();
            layerAlertOk("上传成功");
        }, true);
    });
</c:if>
</script>
